#ifndef BRANCH_H
#define BRANCH_H
#include <string>
#include <memory>
#include "type.h"
#include "ErrorCode.h"

namespace gitstore {
    struct Branch;
	class CMetaDataIOBase;
    class CBranchOperation {
    public:
        CBranchOperation();
        ~CBranchOperation();

	public:
//		ErrorStatus commit(const std::string& note);
        ErrorStatus setVersion(Branch& branch, const std::string& version);

	public:
        ErrorStatus load(std::shared_ptr<CMetaDataIOBase> io_worker, const std::string& ds_name, const std::string& br_name, Branch& branch_info);
        ErrorStatus dump(std::shared_ptr<CMetaDataIOBase> io_worker, const Branch& branch_info);
        ErrorStatus create(const std::string& ds_name, const std::string& br_name, const std::string& br_note, const std::string& version, int type, Branch& branch_info);
//		ErrorStatus getCommitsSort(std::vector<std::string> &commits);
		
	};
}

#endif // CBRANCH_H
